package org.bronycorps.mlptss.domain.ai;

import org.bronycorps.mlptss.domain.ai.actor.VirtualActor;

import com.badlogic.gdx.math.Polygon;
import com.badlogic.gdx.math.Vector2;

public class DatedPolygon extends Polygon {

	private float len = 0;
	public Vector2 p0, p1;
	VirtualActor source;

	public DatedPolygon(Vector2 p0, Vector2 p1, float[] vertices) {
		super(vertices);
		this.p0 = p0;
		this.p1 = p1;
		this.len = p1.cpy().sub(p0).len();
	}

	public VirtualActor getSource() {
		return this.source;
	}

	public float length() {
		return this.len;
	}

	public void setSource(VirtualActor source) {
		this.source = source;
	}

}
